function getSheet() {
	var company_id = $('.tag-select-limited').val()[0];
	var bill_date = $('#bill_date').val();
	var sheet_type = $('#sheet_type').val();
	if(company_id == undefined || company_id == '') {
		$('#error_tips').html("<div class='alert alert-danger alert-dismissable fade in'>" +
    			"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>" +
    			"需选择公司名称"+
				"</div>");
		return;
	}
	if(bill_date == undefined || bill_date == '') {
		$('#error_tips').html("<div class='alert alert-danger alert-dismissable fade in'>" +
                			"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>" +
                			"请输入会计期间"+
            				"</div>");
		return;
	}
	if(sheet_type == undefined || sheet_type == '') {
		$('#error_tips').html("<div class='alert alert-danger alert-dismissable fade in'>" +
                			"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>" +
                			"请选择报表类型"+
            				"</div>");
		return;
	}
	$.post('/ynrfinance/getSheet', {company_id : company_id, bill_date : bill_date, sheet_type:sheet_type}, function(data) {
		if (data == null || data.result_is_null == 'true') {
			$('#warning').html('<p>没有查询到数据，请更换日期后重试！</p>');
			$('#sheet_balance_div').css('display', 'none');
			$('#sheet_cash_div').css('display', 'none');
			$('#sheet_income_div').css('display', 'none');
			$('#warning').css('display', '');
		} else {
			if(data.type == 1){   //资产负债表
				$('#create_time').html(data.create_time);
				$('#expiry_date').html(data.expiry_date);
				$('#preparedby1').html(data.preparedby);
				$('#preparedby2').html(data.preparedby);
				$('#company_controller').html(data.company_controller);
				$('#finance_chief').html(data.finance_chief);
				$('#tabulator').html(data.tabulator);
				$('#monetary_resources_ending_balance').html(data.monetary_resources_ending_balance);
				$('#monetary_resources_beginning_balance').html(data.monetary_resources_beginning_balance);
				$('#short_term_investments_ending_balance').html(data.short_term_investments_ending_balance);
				$('#short_term_investments_beginning_balance').html(data.short_term_investments_beginning_balance);
				$('#bill_receivable_ending_balance').html(data.bill_receivable_ending_balance);
				$('#bill_receivable_beginning_balance').html(data.bill_receivable_beginning_balance);
				$('#accounts_receivable_ending_balance').html(data.accounts_receivable_ending_balance);
				$('#accounts_receivable_beginning_balance').html(data.accounts_receivable_beginning_balance);
				$('#prepayment_ending_balance').html(data.prepayment_ending_balance);
				$('#prepayment_beginning_balance').html(data.prepayment_beginning_balance);
				$('#dividends_receivable_ending_balance').html(data.dividends_receivable_ending_balance);
				$('#dividends_receivable_beginning_balance').html(data.dividends_receivable_beginning_balance);
				$('#interest_receivable_ending_balance').html(data.interest_receivable_ending_balance);
				$('#interest_receivable_beginning_balance').html(data.interest_receivable_beginning_balance);
				$('#other_receivables_ending_balance').html(data.other_receivables_ending_balance);
				$('#other_receivables_beginning_balance').html(data.other_receivables_beginning_balance);
				$('#stock_ending_balance').html(data.stock_ending_balance);
				$('#stock_beginning_balance').html(data.stock_beginning_balance);
				$('#stock_raw_materials_ending_balance').html(data.stock_raw_materials_ending_balance);
				$('#stock_raw_materials_beginning_balance').html(data.stock_raw_materials_beginning_balance);
				$('#stock_product_ending_balance').html(data.stock_product_ending_balance);
				$('#stock_product_beginning_balance').html(data.stock_product_beginning_balance);
				$('#stock_merchandise_inventory_ending_balance').html(data.stock_merchandise_inventory_ending_balance);
				$('#stock_merchandise_inventory_beginning_balance').html(data.stock_merchandise_inventory_beginning_balance);
				$('#stock_revolving_materials_ending_balance').html(data.stock_revolving_materials_ending_balance);
				$('#stock_revolving_materials_beginning_balance').html(data.stock_revolving_materials_beginning_balance);
				$('#other_current_assets_ending_balance').html(data.other_current_assets_ending_balance);
				$('#other_current_assets_beginning_balance').html(data.other_current_assets_beginning_balance);
				$('#total_current_assets_ending_balance').html(data.total_current_assets_ending_balance);
				$('#total_current_assets_beginning_balance').html(data.total_current_assets_beginning_balance);
				$('#long_term_investments_in_bonds_ending_balance').html(data.long_term_investments_in_bonds_ending_balance);
				$('#long_term_investments_in_bonds_beginning_balance').html(data.long_term_investments_in_bonds_beginning_balance);
				$('#long_term_investment_on_stocks_ending_balance').html(data.long_term_investment_on_stocks_ending_balance);
				$('#long_term_investment_on_stocks_beginning_balance').html(data.long_term_investment_on_stocks_beginning_balance);
				$('#fixed_assets_original_cost_ending_balance').html(data.fixed_assets_original_cost_ending_balance);
				$('#fixed_assets_original_cost_beginning_balance').html(data.fixed_assets_original_cost_beginning_balance);
				$('#accumulated_depreciation_ending_balance').html(data.accumulated_depreciation_ending_balance);
				$('#accumulated_depreciation_beginning_balance').html(data.accumulated_depreciation_beginning_balance);
				$('#book_value_of_fixed_assets_ending_balance').html("<a id='showFixedAssetsInfo' style='cursor:pointer'>"+data.book_value_of_fixed_assets_ending_balance+"</a>");
				$('#book_value_of_fixed_assets_beginning_balance').html(data.book_value_of_fixed_assets_beginning_balance);
				$('#construction_in_process_ending_balance').html(data.construction_in_process_ending_balance);
				$('#construction_in_process_beginning_balance').html(data.construction_in_process_beginning_balance);
				$('#construction_materials_ending_balance').html(data.construction_materials_ending_balance);
				$('#construction_materials_beginning_balance').html(data.construction_materials_beginning_balance);
				$('#removal_of_fixed_assets_ending_balance').html(data.removal_of_fixed_assets_ending_balance);
				$('#removal_of_fixed_assets_beginning_balance').html(data.removal_of_fixed_assets_beginning_balance);
				$('#biological_assets_ending_balance').html(data.biological_assets_ending_balance);
				$('#biological_assets_beginning_balance').html(data.biological_assets_beginning_balance);
				$('#intangible_assets_ending_balance').html(data.intangible_assets_ending_balance);
				$('#intangible_assets_beginning_balance').html(data.intangible_assets_beginning_balance);
				$('#development_expenditure_ending_balance').html(data.development_expenditure_ending_balance);
				$('#development_expenditure_beginning_balance').html(data.development_expenditure_beginning_balance);
				$('#long_term_prepaid_expenses_ending_balance').html(data.long_term_prepaid_expenses_ending_balance);
				$('#long_term_prepaid_expenses_beginning_balance').html(data.long_term_prepaid_expenses_beginning_balance);
				$('#other_non_current_assets_ending_balance').html(data.other_non_current_assets_ending_balance);
				$('#other_non_current_assets_beginning_balance').html(data.other_non_current_assets_beginning_balance);
				$('#total_non_current_assets_ending_balance').html(data.total_non_current_assets_ending_balance);
				$('#total_non_current_assets_beginning_balance').html(data.total_non_current_assets_beginning_balance);
				$('#total_assets_ending_balance').html(data.total_assets_ending_balance);
				$('#total_assets_beginning_balance').html(data.total_assets_beginning_balance);
				$('#short_loan_ending_balance').html(data.short_loan_ending_balance);
				$('#short_loan_beginning_balance').html(data.short_loan_beginning_balance);
				$('#notes_payable_ending_balance').html(data.notes_payable_ending_balance);
				$('#notes_payable_beginning_balance').html(data.notes_payable_beginning_balance);
				$('#payable_account_ending_balance').html(data.payable_account_ending_balance);
				$('#payable_account_beginning_balance').html(data.payable_account_beginning_balance);
				$('#deposit_received_ending_balance').html(data.deposit_received_ending_balance);
				$('#deposit_received_beginning_balance').html(data.deposit_received_beginning_balance);
				$('#employee_benefits_payable_ending_balance').html(data.employee_benefits_payable_ending_balance);
				$('#employee_benefits_payable_beginning_balance').html(data.employee_benefits_payable_beginning_balance);
				$('#taxes_payable_ending_balance').html(data.taxes_payable_ending_balance);
				$('#taxes_payable_beginning_balance').html(data.taxes_payable_beginning_balance);
				$('#interest_payable_ending_balance').html(data.interest_payable_ending_balance);
				$('#interest_payable_beginning_balance').html(data.interest_payable_beginning_balance);
				$('#profit_payable_ending_balance').html(data.profit_payable_ending_balance);
				$('#profit_payable_beginning_balance').html(data.profit_payable_beginning_balance);
				$('#accounts_payable_others_ending_balance').html(data.accounts_payable_others_ending_balance);
				$('#accounts_payable_others_beginning_balance').html(data.accounts_payable_others_beginning_balance);
				$('#other_current_liabilities_ending_balance').html(data.other_current_liabilities_ending_balance);
				$('#other_current_liabilities_beginning_balance').html(data.other_current_liabilities_beginning_balance);
				$('#total_current_liabilities_ending_balance').html(data.total_current_liabilities_ending_balance);
				$('#total_current_liabilities_beginning_balance').html(data.total_current_liabilities_beginning_balance);
				$('#long_loan_ending_balance').html(data.long_loan_ending_balance);
				$('#long_loan_beginning_balance').html(data.long_loan_beginning_balance);
				$('#long_term_payables_ending_balance').html(data.long_term_payables_ending_balance);
				$('#long_term_payables_beginning_balance').html(data.long_term_payables_beginning_balance);
				$('#deferred_income_ending_balance').html(data.deferred_income_ending_balance);
				$('#deferred_income_beginning_balance').html(data.deferred_income_beginning_balance);
				$('#other_non_current_liabilities_ending_balance').html(data.other_non_current_liabilities_ending_balance);
				$('#other_non_current_liabilities_beginning_balance').html(data.other_non_current_liabilities_beginning_balance);
				$('#total_non_current_liabilities_ending_balance').html(data.total_non_current_liabilities_ending_balance);
				$('#total_non_current_liabilities_beginning_balance').html(data.total_non_current_liabilities_beginning_balance);
				$('#total_liabilities_ending_balance').html(data.total_liabilities_ending_balance);
				$('#total_liabilities_beginning_balance').html(data.total_liabilities_beginning_balance);
				$('#paid_in_capital_ending_balance').html(data.paid_in_capital_ending_balance);
				$('#paid_in_capital_beginning_balance').html(data.paid_in_capital_beginning_balance);
				$('#capital_reserve_ending_balance').html(data.capital_reserve_ending_balance);
				$('#capital_reserve_beginning_balance').html(data.capital_reserve_beginning_balance);
				$('#earned_surplus_ending_balance').html(data.earned_surplus_ending_balance);
				$('#earned_surplus_beginning_balance').html(data.earned_surplus_beginning_balance);
				$('#undistributed_profit_ending_balance').html(data.undistributed_profit_ending_balance);
				$('#undistributed_profit_beginning_balance').html(data.undistributed_profit_beginning_balance);
				$('#total_equities_ending_balance').html(data.total_equities_ending_balance);
				$('#total_equities_beginning_balance').html(data.total_equities_beginning_balance);
				$('#total_liabilities_and_owner_equity_ending_balance').html(data.total_liabilities_and_owner_equity_ending_balance);
				$('#total_liabilities_and_owner_equity_beginning_balance').html(data.total_liabilities_and_owner_equity_beginning_balance);
				$('#warning').css('display', 'none');
				$('#sheet_cash_div').css('display', 'none');
				$('#sheet_income_div').css('display', 'none');
				$('#sheet_balance_div').css('display', '');
			} else if(data.type == 2) {  //利润表
				$('#create_time').html(data.create_time);
				$('#preparedby').html(data.preparedby);
				$('#company_controller').html(data.company_controller);
				$('#finance_chief').html(data.finance_chief);
				$('#tabulator').html(data.tabulator);
				$('#operating_receipt_year').html("<a id='detailIncome_year' style='cursor:pointer' href='javascript:getDetailData(\"p01\",0,\"营业收入\") '> "+data.operating_receipt_year+"</a>");
				$('#operating_receipt_month').html("<a id='detailIncome_month' style='cursor:pointer' href='javascript:getDetailData(\"p01\",1,\"营业收入\") '>"+data.operating_receipt_month+"</a>");
				$('#cost_in_business_year').html("<a id='detailCost_year' style='cursor:pointer' href='javascript:getDetailData(\"p02\",0,\"营业成本\") '>"+data.cost_in_business_year+"</a>");
				$('#cost_in_business_month').html("<a id='detailCost_month' style='cursor:pointer' href='javascript:getDetailData(\"p02\",1,\"营业成本\") '>"+data.cost_in_business_month+"</a>");
				$('#business_tariff_and_annex_year').html(data.business_tariff_and_annex_year);
				$('#business_tariff_and_annex_month').html(data.business_tariff_and_annex_month);
				$('#excise_tax_year').html("<a id='detailsExciseTax_year' style='cursor:pointer' href='javascript:getDetailData(\"p0304\",0,\"消费税\") '>"+data.excise_tax_year+"</a>");
				$('#excise_tax_month').html("<a id='detailsExciseTax_month' style='cursor:pointer' href='javascript:getDetailData(\"p0304\",1,\"消费税\") '>"+data.excise_tax_month+"</a>");
				$('#sales_tax_year').html( "<a id='detailSalesTax_year' style='cursor:pointer' href='javascript:getDetailData(\"p03 \",0,\"营业税金及附加\") '>"+  data.sales_tax_year+"</a>");
				$('#sales_tax_month').html("<a id='detailSalesTax_month' style='cursor:pointer' href='javascript:getDetailData(\"p03\",1,\"营业税金及附加\") '>"+data.sales_tax_month+"</a>");
				$('#urban_maintenance_and_construction_tax_year').html("<a id='detailsUrban_year' style='cursor:pointer' href='javascript:getDetailData(\"p0306\",0,\"城市维护建设税\") '>"+data.urban_maintenance_and_construction_tax_year+"</a>");
				$('#urban_maintenance_and_construction_month').html("<a id='detailsUrban_month' style='cursor:pointer' href='javascript:getDetailData(\"p0306\",1,\"城市维护建设税\") '>"+data.urban_maintenance_and_construction_month+"</a>");
				$('#resource_tax_year').html("<a id='detailsResourceTax_year' style='cursor:pointer' href='javascript:getDetailData(\"p0307\",0,\"资源税\") '>"+data.resource_tax_year+"</a>");
				$('#resource_tax_month').html("<a id='detailsResourceTax_month' style='cursor:pointer' href='javascript:getDetailData(\"p0307\",1,\"资源税\") '>"+data.resource_tax_month+"</a>");
				$('#land_value_increment_tax_year').html("<a id='detailsLandValueIncrementTax_year' style='cursor:pointer' href='javascript:getDetailData(\"p0308\",0,\"土地增值税\") '>"+data.land_value_increment_tax_year+"</a>");
				$('#land_value_increment_tax_month').html("<a id='detailsLandValueIncrementTax_month' style='cursor:pointer' href='javascript:getDetailData(\"p0308\",1,\"土地增值税\") '>"+data.land_value_increment_tax_month+"</a>");
				$('#land_house_tax_year').html("<a id='detailsLandHouseTax_year' style='cursor:pointer' href='javascript:getDetailData(\"p0309\",0,\"城镇土地使用税、房产税、车船税、印花税\") '>"+data.land_house_tax_year+"</a>");
				$('#land_house_tax_month').html("<a id='detailsLandHouseTax_month' style='cursor:pointer' href='javascript:getDetailData(\"p0309\",1,\"城镇土地使用税、房产税、车船税、印花税\") '>"+data.land_house_tax_month+"</a>");
				$('#education_year').html("<a id='detailsEducation_year' style='cursor:pointer' href='javascript:getDetailData(\"p0310\",0,\"教育费附加、矿产资源补偿费、排污费\") '>"+data.education_year+"</a>");
				$('#education_month').html("<a id='detailsEducation_month' style='cursor:pointer' href='javascript:getDetailData(\"p0310\",1,\"教育费附加、矿产资源补偿费、排污费\") '>"+data.education_month+"</a>");
				$('#sales_year').html("<a id='detailsSales_year' style='cursor:pointer' href='javascript:getDetailData(\"p11\",0,\"销售费用\") '>"+data.sales_year+"</a>");
				$('#sales_month').html("<a id='detailsSales_month' style='cursor:pointer'href='javascript:getDetailData(\"p11\",1,\"销售费用\") '>"+data.sales_month+"</a>");
				$('#maintenance_year').html("<a id='detailsMaintenance_year' style='cursor:pointer' href='javascript:getDetailData(\"p1112\",0,\"商品维修费\") '"+data.maintenance_year+"</a>");
				$('#maintenance_month').html("<a id='detailsMaintenance_month' style='cursor:pointer' href='javascript:getDetailData(\"p1112\",1,\"商品维修费\") '>"+data.maintenance_month+"</a>");
				$('#advertise_year').html("<a id='detailsAdvertise_year' style='cursor:pointer' href='javascript:getDetailData(\"p1113\",0,\"广告费和业务宣传费\") '"+data.advertise_year+"</a>");
				$('#advertise_month').html("<a id='detailsAdvertise_month' style='cursor:pointer' href='javascript:getDetailData(\"p1113\",1,\"广告费和业务宣传费\") '>"+data.advertise_month+"</a>");
				$('#manage_year').html("<a id='detailsManage_year' style='cursor:pointer' href='javascript:getDetailData(\"p14\",0,\"管理费用\") '>"+data.manage_year+"</a>");
				$('#manage_month').html("<a id='detailsManage_month' style='cursor:pointer' href='javascript:getDetailData(\"p14\",1,\"管理费用\") '>"+data.manage_month+"</a>");
				$('#establishment_charges_year').html("<a id='detailsEstablishment_year' style='cursor:pointer' href='javascript:getDetailData(\"p1415\",0,\"开办费\") '>"+data.establishment_charges_year+"</a>");
				$('#establishment_charges_month').html("<a id='detailsEstablishment_month' style='cursor:pointer' href='javascript:getDetailData(\"p1415\",1,\"开办费\") '>"+data.establishment_charges_month+"</a>");
				$('#business_entertainment_year').html("<a id='detailsInfoBusinessEntertainment_year' style='cursor:pointer'  href='javascript:getDetailData(\"p1416\",0,\"业务招待费\") '>"+data.business_entertainment_year+"</a>");
				$('#business_entertainment_month').html("<a id='detailsInfoBusinessEntertainment_month' style='cursor:pointer'  href='javascript:getDetailData(\"p1416\",1,\"业务招待费\") '>"+data.business_entertainment_month+"</a>");
				$('#research_year').html("<a id='detailsResearch_year' style='cursor:pointer'  href='javascript:getDetailData(\"p1417\",0,\"研究费用\") '>"+data.research_year+"</a>");
				$('#research_month').html("<a id='detailsResearch_month' style='cursor:pointer'  href='javascript:getDetailData(\"p1417\",1,\"研究费用\") '>"+data.research_month+"</a>");
				$('#finance_year').html("<a id='detailsFinance_year' style='cursor:pointer'  href='javascript:getDetailData(\"p18\",0,\"财务费用\") '>"+data.finance_year+"</a>");
				$('#finance_month').html("<a id='detailsFinance_month' style='cursor:pointer'  href='javascript:getDetailData(\"p18\",1,\"财务费用\") '>"+data.finance_month+"</a>");
				$('#interest_year').html("<a id='detailsInterest_year' style='cursor:pointer'  href='javascript:getDetailData(\"p1819\",0,\"利息费用\") '>"+data.interest_year+"</a>");
				$('#interest_month').html("<a id='detailsInterest_month' style='cursor:pointer'  href='javascript:getDetailData(\"p1819\",1,\"利息费用\") '>"+data.interest_month+"</a>");
				$('#equity_earnings_year').html("<a id='detailsEquityEarmimg_year' style='cursor:pointer'  href='javascript:getDetailData(\"p20\",0,\"投资收益\") '>"+data.equity_earnings_year+"</a>");
				$('#equity_earnings_month').html("<a id='detailsEquityEarmimg_month' style='cursor:pointer'  href='javascript:getDetailData(\"p20\",1,\"投资收益\") '>"+data.equity_earnings_month+"</a>");
				$('#operating_profit_year').html("<a id='detailsOperatingProfit_year' style='cursor:pointer' href='javascript:getDetailData(\"p21\",0,\"营业利润\") '>"+data.operating_profit_year+"</a>");
				$('#operating_profit_month').html("<a id='detailsOperatingProfit_month' style='cursor:pointer' href='javascript:getDetailData(\"p21\",1,\"营业利润\") '>"+data.operating_profit_month+"</a>");
				$('#nonbusiness_income_year').html("<a id='detailsNonbusinessIncome_year' style='cursor:pointer' href='javascript:getDetailData(\"p22\",0,\"营业外收入\") '>"+data.nonbusiness_income_year+"</a>");
				$('#nonbusiness_income_month').html("<a id='detailsNonbusinessIncome_month' style='cursor:pointer' href='javascript:getDetailData(\"p22\",1,\"营业外收入\") '>"+data.nonbusiness_income_month+"</a>");
				$('#government_grants_year').html("<a id='detailsGovernment_year' style='cursor:pointer'  href='javascript:getDetailData(\"p2223\",0,\"政府补助\") '>"+data.government_grants_year+"</a>");
				$('#government_grants_month').html("<a id='detailsGovernment_month' style='cursor:pointer'  href='javascript:getDetailData(\"p2223\",1,\"政府补助\") '>"+data.government_grants_month+"</a>");
				$('#non_business_expenditure_year').html("<a id='detailsNonBusinessExpenditure_year' style='cursor:pointer'  href='javascript:getDetailData(\"p24\",0,\"营业外支出\") '>"+data.non_business_expenditure_year+"</a>");
				$('#non_business_expenditure_month').html("<a id='detailsNonBusinessExpenditure_month' style='cursor:pointer'  href='javascript:getDetailData(\"p24\",1,\"营业外支出\") '>"+data.non_business_expenditure_month+"</a>");
				$('#loss_on_bad_debt_year').html("<a id='detailsLossBad_year' style='cursor:pointer'  href='javascript:getDetailData(\"p2425\",0,\"坏账损失\") '>"+data.loss_on_bad_debt_year+"</a>");
				$('#loss_on_bad_debt_month').html("<a id='detailsLossBad_month' style='cursor:pointer'  href='javascript:getDetailData(\"p2425\",1,\"坏账损失\") '>"+data.loss_on_bad_debt_month+"</a>");
				$('#loss_on_long_term_bonds_year').html("<a id='detailsLongTermBonds_year' style='cursor:pointer'  href='javascript:getDetailData(\"p2426\",0,\"无法收回的长期债券投资损失\") '>"+data.loss_on_long_term_bonds_year+"</a>");
				$('#loss_on_long_term_bonds_month').html("<a id='detailsLongTermBonds_month' style='cursor:pointer'  href='javascript:getDetailData(\"p2426\",1,\"无法收回的长期债券投资损失\") '>"+data.loss_on_long_term_bonds_month+"</a>");
				$('#loss_on_long_term_stock_year').html("<a id='detailsLongTermStock_year' style='cursor:pointer'  href='javascript:getDetailData(\"p2427\",0,\"无法收回的长期股权投资损失\") '>"+data.loss_on_long_term_stock_year+"</a>");
				$('#loss_on_long_term_stock_month').html("<a id='detailsLongTermStock_month' style='cursor:pointer'  href='javascript:getDetailData(\"p2427\",1,\"无法收回的长期股权投资损失\") '>"+data.loss_on_long_term_stock_month+"</a>");
				$('#loss_on_long_term_natural_calamities_year').html("<a id='detailsNaturalCalamities_year' style='cursor:pointer'  href='javascript:getDetailData(\"p2428\",0,\"自然灾害等不可抗力因素造成的损失\") '>"+data.loss_on_long_term_natural_calamities_year+"</a>");
				$('#loss_on_long_term_natural_calamities_month').html("<a id='detailsNaturalCalamities_month' style='cursor:pointer'  href='javascript:getDetailData(\"p2428\",1,\"自然灾害等不可抗力因素造成的损失\") '>"+data.loss_on_long_term_natural_calamities_month+"</a>");
				$('#tax_delay_charge_year').html("<a id='detailsTaxDelayCharge_year' style='cursor:pointer'  href='javascript:getDetailData(\"p2429\",0,\"税收滞纳金\") '>"+data.tax_delay_charge_year+"</a>");
				$('#tax_delay_charge_month').html("<a id='detailsTaxDelayCharge_month' style='cursor:pointer'  href='javascript:getDetailData(\"p2429\",1,\"税收滞纳金\") '>"+data.tax_delay_charge_month+"</a>");
				$('#total_profit_year').html("<a id='detailsTotalProfit_year' style='cursor:pointer' href='javascript:getDetailData(\"p30\",0,\"利润总额\") '>"+data.total_profit_year+"</a>");
				$('#total_profit_month').html("<a id='detailsTotalProfit_month' style='cursor:pointer' href='javascript:getDetailData(\"p30\",1,\"利润总额\") '>"+data.total_profit_month+"</a>");
				$('#income_tax_expense_year').html("<a id='detailsIncomeTaxExpense_year' style='cursor:pointer'  href='javascript:getDetailData(\"p31\",0,\"所得税费用\") '>"+data.income_tax_expense_year);
				$('#income_tax_expense_month').html("<a id='detailsIncomeTaxExpense_month' style='cursor:pointer'  href='javascript:getDetailData(\"p31\",1,\"所得税费用\") '>"+data.income_tax_expense_month);
				$('#net_margin_year').html("<a id='detailsNetMargin_year' style='cursor:pointer' href='javascript:getDetailData(\"p32\",0,\"净利润\")'>"+data.net_margin_year+"</a>");
				$('#net_margin_month').html("<a   id='detailsNetMargin_month' style='cursor:pointer' href='javascript:getDetailData(\"p32\",1,\"净利润\")'>"+data.net_margin_month+"</a>");
				$('#warning').css('display', 'none');
				$('#sheet_balance_div').css('display', 'none');
				$('#sheet_cash_div').css('display', 'none');
				$('#sheet_income_div').css('display', '');
			} else if(data.type == 3) {  //现金流量表
				$('#create_time').html(data.create_time);
				$('#preparedby').html(data.preparedby);
				$('#company_controller').html(data.company_controller);
				$('#finance_chief').html(data.finance_chief);
				$('#tabulator').html(data.tabulator);
				$('#sales_year').html(data.sales_year);
				$('#sales_month').html(data.sales_month);
				$('#receive_year').html(data.receive_year);
				$('#receive_month').html(data.receive_month);
				$('#buy_year').html(data.buy_year);
				$('#buy_month').html(data.buy_month);
				$('#salary_year').html(data.salary_year);
				$('#salary_month').html(data.salary_month);
				$('#tax_year').html(data.tax_year);
				$('#tax_month').html(data.tax_month);
				$('#other_pay_year').html(data.other_pay_year);
				$('#other_pay_month').html(data.other_pay_month);
				$('#operating_activities_year').html(data.operating_activities_year);
				$('#operating_activities_month').html(data.operating_activities_month);
				$('#take_back_year').html(data.take_back_year);
				$('#take_back_month').html(data.take_back_month);
				$('#equity_earnings_year').html(data.equity_earnings_year);
				$('#equity_earnings_month').html(data.equity_earnings_month);
				$('#handle_year').html(data.handle_year);
				$('#handle_month').html(data.handle_month);
				$('#investments_pay_year').html(data.investments_pay_year);
				$('#investments_pay_month').html(data.investments_pay_month);
				$('#coustruction_year').html(data.coustruction_year);
				$('#coustruction_month').html(data.coustruction_month);
				$('#activity_investment_year').html(data.activity_investment_year);
				$('#activity_investment_month').html(data.activity_investment_month);
				$('#loan_year').html(data.loan_year);
				$('#loan_month').html(data.loan_month);
				$('#investors_to_invest_year').html(data.investors_to_invest_year);
				$('#investors_to_invest_month').html(data.investors_to_invest_month);
				$('#payment_of_principal_year').html(data.payment_of_principal_year);
				$('#payment_of_principal_month').html(data.payment_of_principal_month);
				$('#paid_interest_year').html(data.paid_interest_year);
				$('#paid_interest_month').html(data.paid_interest_month);
				$('#distribute_profit_year').html(data.distribute_profit_year);
				$('#distribute_profit_month').html(data.distribute_profit_month);
				$('#financing_activity_year').html(data.financing_activity_year);
				$('#financing_activity_month').html(data.financing_activity_month);
				$('#net_increase_in_cash_year').html(data.net_increase_in_cash_year);
				$('#net_increase_in_cash_month').html(data.net_increase_in_cash_month);
				$('#cash_at_beginning_of_period_year').html(data.cash_at_beginning_of_period_year);
				$('#cash_at_beginning_of_period_month').html(data.cash_at_beginning_of_period_month);
				$('#ending_cash_balance_year').html(data.ending_cash_balance_year);
				$('#ending_cash_balance_month').html(data.ending_cash_balance_month);
				$('#warning').css('display', 'none');
				$('#sheet_balance_div').css('display', 'none');
				$('#sheet_income_div').css('display', 'none');
				$('#sheet_cash_div').css('display', '');
			}
		}
	});
}

function downloadSheet() {
	var company_id = $('.tag-select-limited').val()[0];
	var bill_date = $('#bill_date').val();
	var sheet_type = $('#sheet_type').val();
	if(company_id == undefined || company_id == '') {
		$('#error_tips').html("<div class='alert alert-danger alert-dismissable fade in'>" +
    			"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>" +
    			"需选择公司名称"+
				"</div>");
		return;
	}
	if(bill_date == undefined || bill_date == '') {
		$('#error_tips').html("<div class='alert alert-danger alert-dismissable fade in'>" +
                			"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>" +
                			"请输入会计期间"+
            				"</div>");
		return;
	}
	if(sheet_type == undefined || sheet_type == '') {
		$('#error_tips').html("<div class='alert alert-danger alert-dismissable fade in'>" +
                			"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>" +
                			"请选择报表类型"+
            				"</div>");
		return;
	}
	$.post('/ynrfinance/isSheetInfoExist', {company_id : company_id, bill_date : bill_date, sheet_type:sheet_type}, function(data) {
		if(data.isSheetInfoExist == 0) {
			$('#warning').html('<p>没有查询到数据，请更换日期后重试！</p>')
			$('#warning').css('display', '');
		} else {
			$('#companyId').val(company_id);
			$('#billDate').val(bill_date);
			$('#sheetType').val(sheet_type);
			$('#download').submit();
		}
	})
}